'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 成就
 * @author sundbcn@gmail.com (sun debing)
 */

var dataApi = require('../libs/dataApi');
var _ = require('lodash');
var randomUtil = require('../util/randomUtil.js');
var constantUtil = require('../util/constantUtil.js');

/**
 * 获取奖励随机数
 * @param  {[type]} vip [description]
 * @return {[type]}     [description]
 */
exports.getConf = function () {
    var max_num = constantUtil.value('turntable_random_num');
    var random_num = _.random(1, max_num);
    var list_all = dataApi.turntable_config.findById(random_num);
    return list_all;
};

/**
 * 获取次数消耗砖石
 * @param  {[type]} vip [description]
 * @return {[type]}     [description]
 */
exports.getConsume = function (num) {
    return dataApi.turntable_cost.findById(num);
};
